<?php get_header();
$catefory = get_queried_object();
$catefory_link = get_category_link($catefory);
?>

    <div class="page_title">

        <div class="container">
            <div class="leaft_title"><h1><?php echo $catefory->name ?></h1></div>
            <div class="reght_pagenation">
                <?php if (function_exists('yoast_breadcrumb')) {
                    yoast_breadcrumb('', '');
                } ?>
            </div>
        </div>

    </div><!-- end page title -->

    <div class="clearfix"></div>


    <div class="container">

        <div class="content_left">

            <?php while (have_posts()): the_post();

                $postID = get_the_ID();
                $title = get_the_title();

                $post->filter = 'sample';
                $permalink = get_permalink();

                $thumbnail_id = get_post_thumbnail_id($postID);
                $image = wp_get_attachment_image_src($thumbnail_id, 'thumbnail', true);
                $image_thumbnail = $image[0];

                $excerpt = get_the_excerpt();
                $content_mail = $excerpt . '%0D%0A%0D%0A' . $permalink;

                $post_date = the_date('Y/m/d', '', '', false);

                $term_link = get_term_link($category);
                $content = get_the_content();

                ?>
                <div class="blog_post">
                    <div class="blog_postcontent">
                        <div class="image_frame small"><a href="<?php echo $permalink ?>" title="<?php echo esc_attr($title) ?>"><img src="<?php echo $image_thumbnail ?>" alt="<?php echo esc_attr($title) ?>"/></a>
                        </div>
                        <div class="post_info_content_small">
                            <a href="#" class="date"><strong><?php echo date("d", strtotime($post_date)); ?></strong><i>tháng <?php echo date("m", strtotime($post_date)); ?></i></a>

                            <h3><a href="<?php echo $permalink ?>" title="<?php echo esc_attr($title) ?>"><?php echo $title ?></a></h3>
                            <ul class="post_meta_links_small">
                                <li class="post_categoty"><?php the_category(',') ?></li>
                            </ul>

                            <div class="clearfix"></div>

                            <p><?php echo Azio_Posts::cut_tring_by_char(strip_tags($content), 380) ?></p>

                        </div>
                    </div>
                </div>
                <!-- /# end post -->

                <div class="clearfix divider_line3"></div>

            <?php endwhile ?>

            <div class="pagination">
                <?php wp_pagenavi(); ?>
            </div>
            <!-- end pagination -->

        </div>
        <!-- end content left area -->


        <!-- right sidebar starts -->
        <?php get_sidebar('default') ?>
        <!-- end right sidebar -->


    </div>



    <div class="clearfix"></div>

<?php get_footer() ?>